0a43d5fcf7203e77feca74f18ad0431b14126629,src/main/org/codehaus/groovy/reflection/CachedMethod.java,CachedMethod,createPojoMetaMethodSite,#CallSite#MetaClassImpl#Class[]#,240
Before Change
public CallSite createPojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params) {
if (!hasPojoCallSiteConstructor()) {
Constructor constr = null;
if (CallSiteGenerator.isCompilable(this)) {
constr = CallSiteGenerator.compilePojoMethod(this);
if (constr != null)
pojoCallSiteConstructor = new SoftReference<Constructor> (constr);
}
}
if (hasPogoCallSiteConstructor()) {
final Constructor constructor = pojoCallSiteConstructor.get();
if (constructor != null) {
try {
return (CallSite) constructor.newInstance(site, metaClass, this, params, constructor);
} catch (Throwable e) { //
After Change
public CallSite createPojoMetaMethodSite(CallSite site, MetaClassImpl metaClass, Class[] params) {
if (!skipCompiled) {
Constructor constr = getConstrcutor(pojoCallSiteConstructor);
if (constr==null) {
if (CallSiteGenerator.isCompilable(this)) {
constr = CallSiteGenerator.compilePojoMethod(this);
}
if (constr != null) {
pojoCallSiteConstructor = new SoftReference<Constructor> (constr);
} else {
skipCompiled = true;
}
}
if (constr!=null) {
try {
return (CallSite) constr.newInstance(site, metaClass, this, params, constr);
} catch (Error e) {
skipCompiled=true;
throw e;
} catch (Throwable e) {
skipCompiled=true;
}